﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
        xmlns:src="clr-namespace:Serietheque.Fenetres"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Serietheque.Fenetres.Progression"
        Title="Progression"  
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        SizeToContent="Height"
        Width="520" BorderThickness="2" BorderBrush="{DynamicResource NormalBorderBrush}" WindowStyle="None" d:DesignHeight="515">
    <Window.Resources>

    	<ControlTemplate x:Key="WindowTemplateKey" TargetType="{x:Type Window}">
    		<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
    			<Grid>
    				<AdornerDecorator>
    					<ContentPresenter/>
    				</AdornerDecorator>
    				<ResizeGrip x:Name="WindowResizeGrip" HorizontalAlignment="Right" IsTabStop="false" Visibility="Collapsed" VerticalAlignment="Bottom"/>
    			</Grid>
    		</Border>
    		<ControlTemplate.Triggers>
    			<MultiTrigger>
    				<MultiTrigger.Conditions>
    					<Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
    					<Condition Property="WindowState" Value="Normal"/>
    				</MultiTrigger.Conditions>
    				<Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible"/>
    			</MultiTrigger>
    		</ControlTemplate.Triggers>
    	</ControlTemplate>
    	<Style x:Key="WindowStyle1" TargetType="{x:Type Window}">
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Window}">
    					<StackPanel Orientation="Vertical">
    						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Height="20" Background="{DynamicResource RowBackgroundAlternationIndex3Brush}">
    							<TextBlock x:Name="textBlock" TextWrapping="Wrap" Width="490" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,0,0,0" Foreground="{DynamicResource GlyphBrush}"><Run Language="fr-fr" Text="Progression"/></TextBlock>
    							<Button x:Name="button" Height="20" IsCancel="True" HorizontalAlignment="Right" BorderThickness="0" Foreground="{DynamicResource LightBrush}" BorderBrush="{x:Null}" Background="#FF4D4D4D" Content="X" Width="20"/>
    						</StackPanel>
    						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
    							<AdornerDecorator>
    								<ContentPresenter/>
    							</AdornerDecorator>
    						</Border>
    					</StackPanel>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Style.Triggers>
    			<Trigger Property="ResizeMode" Value="CanResizeWithGrip">
    				<Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
    			</Trigger>
    		</Style.Triggers>
    	</Style>

    </Window.Resources>
    <Grid Height="473">
		<StackPanel HorizontalAlignment="Left" Width="Auto" Margin="0">
			<StackPanel x:Name="skp1" Margin="5">
				<Label Height="24" x:Name="lblProcessing" HorizontalAlignment="Center" Foreground="Black" Content="Travaille (un peu)..."
					HorizontalContentAlignment="Left" Width="Auto" Margin="5"/>
				<ProgressBar Margin="5,0,5,5" Height="19" Width="500" HorizontalAlignment="Center" x:Name="pbProcessing" BorderThickness="5,0,5,5"/>
                <TextBlock Height="33" FontWeight="Bold" FontFamily="Calibri" x:Name="enCourTB" HorizontalAlignment="Left" MaxWidth="600" Margin="5,0,5,5" TextWrapping="Wrap" Width="0" />
				<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5,0,5,5">
					<TextBlock FontWeight="Bold" FontFamily="Calibri" x:Name="numTB" />
					<TextBlock FontWeight="Bold" FontFamily="Calibri" Text=" sur "/>
					<TextBlock FontWeight="Bold" FontFamily="Calibri" x:Name="totalTB"/>
				</StackPanel>
			</StackPanel>
			<StackPanel x:Name="skp" Height="339" Width="520">
				<ScrollViewer HorizontalScrollBarVisibility="Auto"  Height="300" VerticalScrollBarVisibility="Auto" Margin="5,5,5,0" BorderBrush="Black" Background="{DynamicResource LightBrush}">
					<TextBlock x:Name="resultat" TextWrapping="Wrap" Foreground="White" />
				</ScrollViewer>
				<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
					<Button x:Name="ok" IsDefault="True" HorizontalAlignment="Center" VerticalAlignment="Center" Width="83" Height="24" Margin="5,5,0,5" Content="Ok" IsEnabled="False" IsCancel="True" />
					<Button Height="24" x:Name="StopBtn" Click="StopBtn_Click" Width="83" Margin="5" Content="Stop"/>
				</StackPanel>
			</StackPanel>
		</StackPanel>
	</Grid>
</Window>